namespace QMVnSoft.Invoices
{
    using QMVnSoft;
    using QMVnSoft.Controls;
    using QMVnSoft.Controls.ChildGridControls;
    using QMVnSoft.DAL;
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class FormCTKHOViewer : FormHistoryViewer
    {
        private IContainer components;
        private GridDetail grdDetail;
        private LabelControl lblDesc_EN;
        private LabelControl lblDia_Chi;
        private LabelControl lblDien_Giai;
        private LabelControl lblGhi_Chu;
        private LabelControl lblMa_Dt;
        private LabelControl lblMa_KhoN;
        private LabelControl lblOng_Ba;
        private CTKHODataAccess oMethod = new CTKHODataAccess();
        private TextControl txtDesc_EN;
        private TextControl txtDia_Chi;
        private TextControl txtDien_Giai;
        private TextControl txtGhi_Chu;
        private TextSearch txtMa_Dt;
        private TextSearch txtMa_KhoN;
        private TextControl txtOng_Ba;
        private TextControl txtTen_Dt;
        private SearchColumn Column9;
        private DataGridViewTextBoxColumn Column10;
        private OptionColumn Column11;
        private SearchColumn Column12;
        private DataGridViewTextBoxColumn Column1;
        private SearchColumn Column17;
        private DateColumn Column18;
        private NumericColumn Column19;
        private NumericColumn Column20;
        private NumericColumn Column21;
        private DataGridViewTextBoxColumn Column2;
        private DataGridViewTextBoxColumn Column23;
        private NumericColumn Column22;
        private TextControl txtTen_KhoN;

        public FormCTKHOViewer()
        {
            this.InitializeComponent();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormCTKHOViewer));
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
            this.txtDesc_EN = new QMVnSoft.Controls.TextControl();
            this.txtDien_Giai = new QMVnSoft.Controls.TextControl();
            this.lblDesc_EN = new QMVnSoft.Controls.LabelControl();
            this.lblDien_Giai = new QMVnSoft.Controls.LabelControl();
            this.txtDia_Chi = new QMVnSoft.Controls.TextControl();
            this.txtOng_Ba = new QMVnSoft.Controls.TextControl();
            this.txtTen_Dt = new QMVnSoft.Controls.TextControl();
            this.txtMa_Dt = new QMVnSoft.Controls.TextSearch();
            this.lblDia_Chi = new QMVnSoft.Controls.LabelControl();
            this.lblOng_Ba = new QMVnSoft.Controls.LabelControl();
            this.lblMa_Dt = new QMVnSoft.Controls.LabelControl();
            this.lblMa_KhoN = new QMVnSoft.Controls.LabelControl();
            this.grdDetail = new QMVnSoft.Controls.GridDetail();
            this.txtMa_KhoN = new QMVnSoft.Controls.TextSearch();
            this.txtTen_KhoN = new QMVnSoft.Controls.TextControl();
            this.lblGhi_Chu = new QMVnSoft.Controls.LabelControl();
            this.txtGhi_Chu = new QMVnSoft.Controls.TextControl();
            this.Column9 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column11 = new QMVnSoft.Controls.ChildGridControls.OptionColumn();
            this.Column12 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column17 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column18 = new QMVnSoft.Controls.ChildGridControls.DateColumn();
            this.Column19 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column20 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column21 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column23 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column22 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            ((System.ComponentModel.ISupportInitialize)(this.grdDetail)).BeginInit();
            this.SuspendLayout();
            // 
            // lblPhan_Loai
            // 
            this.lblPhan_Loai.Location = new System.Drawing.Point(12, 514);
            // 
            // txtMa_Loai1
            // 
            this.txtMa_Loai1.Location = new System.Drawing.Point(99, 511);
            this.txtMa_Loai1.TabIndex = 11;
            // 
            // txtMa_Loai2
            // 
            this.txtMa_Loai2.Location = new System.Drawing.Point(327, 511);
            this.txtMa_Loai2.TabIndex = 12;
            // 
            // txtMa_Loai3
            // 
            this.txtMa_Loai3.Location = new System.Drawing.Point(555, 511);
            this.txtMa_Loai3.TabIndex = 13;
            // 
            // txtNgay_Ct
            // 
            this.txtNgay_Ct.TabIndex = 1;
            // 
            // txtNgay_Ps
            // 
            this.txtNgay_Ps.TabIndex = 0;
            // 
            // txtSo_Ct
            // 
            this.txtSo_Ct.TabIndex = 2;
            // 
            // txtDesc_EN
            // 
            this.txtDesc_EN.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.txtDesc_EN.CheckTextSearched = false;
            this.txtDesc_EN.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtDesc_EN.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtDesc_EN.Location = new System.Drawing.Point(487, 91);
            this.txtDesc_EN.MaxLength = 254;
            this.txtDesc_EN.Name = "txtDesc_EN";
            this.txtDesc_EN.OldValue = null;
            this.txtDesc_EN.ReadOnly = true;
            this.txtDesc_EN.Size = new System.Drawing.Size(295, 20);
            this.txtDesc_EN.TabIndex = 7;
            this.txtDesc_EN.UserTextLength = QMVnSoft.AppInstance.TextControlLength.InvoiceDescription;
            this.txtDesc_EN.UserTrimMode = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtDesc_EN.Value = ((object)(resources.GetObject("txtDesc_EN.Value")));
            // 
            // txtDien_Giai
            // 
            this.txtDien_Giai.CheckTextSearched = false;
            this.txtDien_Giai.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtDien_Giai.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtDien_Giai.Location = new System.Drawing.Point(99, 91);
            this.txtDien_Giai.MaxLength = 254;
            this.txtDien_Giai.Name = "txtDien_Giai";
            this.txtDien_Giai.OldValue = null;
            this.txtDien_Giai.ReadOnly = true;
            this.txtDien_Giai.Size = new System.Drawing.Size(296, 20);
            this.txtDien_Giai.TabIndex = 6;
            this.txtDien_Giai.UserTextLength = QMVnSoft.AppInstance.TextControlLength.InvoiceDescription;
            this.txtDien_Giai.UserTrimMode = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtDien_Giai.Value = ((object)(resources.GetObject("txtDien_Giai.Value")));
            // 
            // lblDesc_EN
            // 
            this.lblDesc_EN.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.lblDesc_EN.AutoSize = true;
            this.lblDesc_EN.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDesc_EN.Location = new System.Drawing.Point(410, 94);
            this.lblDesc_EN.Name = "lblDesc_EN";
            this.lblDesc_EN.Size = new System.Drawing.Size(71, 14);
            this.lblDesc_EN.TabIndex = 80;
            this.lblDesc_EN.Text = "Diễn giải (EN)";
            // 
            // lblDien_Giai
            // 
            this.lblDien_Giai.AutoSize = true;
            this.lblDien_Giai.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDien_Giai.Location = new System.Drawing.Point(12, 94);
            this.lblDien_Giai.Name = "lblDien_Giai";
            this.lblDien_Giai.Size = new System.Drawing.Size(73, 14);
            this.lblDien_Giai.TabIndex = 81;
            this.lblDien_Giai.Text = "Diễn giải (VN)";
            // 
            // txtDia_Chi
            // 
            this.txtDia_Chi.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.txtDia_Chi.CheckTextSearched = false;
            this.txtDia_Chi.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtDia_Chi.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtDia_Chi.Location = new System.Drawing.Point(487, 70);
            this.txtDia_Chi.MaxLength = 128;
            this.txtDia_Chi.Name = "txtDia_Chi";
            this.txtDia_Chi.OldValue = null;
            this.txtDia_Chi.ReadOnly = true;
            this.txtDia_Chi.Size = new System.Drawing.Size(295, 20);
            this.txtDia_Chi.TabIndex = 5;
            this.txtDia_Chi.UserTextLength = QMVnSoft.AppInstance.TextControlLength.ItemDescription;
            this.txtDia_Chi.UserTrimMode = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtDia_Chi.Value = ((object)(resources.GetObject("txtDia_Chi.Value")));
            // 
            // txtOng_Ba
            // 
            this.txtOng_Ba.CheckTextSearched = false;
            this.txtOng_Ba.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtOng_Ba.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtOng_Ba.Location = new System.Drawing.Point(99, 70);
            this.txtOng_Ba.MaxLength = 128;
            this.txtOng_Ba.Name = "txtOng_Ba";
            this.txtOng_Ba.OldValue = null;
            this.txtOng_Ba.ReadOnly = true;
            this.txtOng_Ba.Size = new System.Drawing.Size(296, 20);
            this.txtOng_Ba.TabIndex = 4;
            this.txtOng_Ba.UserTextLength = QMVnSoft.AppInstance.TextControlLength.ItemDescription;
            this.txtOng_Ba.UserTrimMode = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtOng_Ba.Value = ((object)(resources.GetObject("txtOng_Ba.Value")));
            // 
            // txtTen_Dt
            // 
            this.txtTen_Dt.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Dt.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247)))));
            this.txtTen_Dt.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Dt.CheckTextSearched = false;
            this.txtTen_Dt.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Dt.Enabled = false;
            this.txtTen_Dt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Dt.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Dt.Location = new System.Drawing.Point(223, 52);
            this.txtTen_Dt.Name = "txtTen_Dt";
            this.txtTen_Dt.OldValue = null;
            this.txtTen_Dt.Size = new System.Drawing.Size(559, 13);
            this.txtTen_Dt.TabIndex = 97;
            this.txtTen_Dt.UserTextLength = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTen_Dt.UserTrimMode = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Dt.Value = ((object)(resources.GetObject("txtTen_Dt.Value")));
            // 
            // txtMa_Dt
            // 
            this.txtMa_Dt.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_Dt.CheckTextSearched = false;
            this.txtMa_Dt.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_Dt.FieldDisplay = "Ten_Dt";
            this.txtMa_Dt.FirstFilter = "Is_Stop = \'1\'";
            this.txtMa_Dt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_Dt.Location = new System.Drawing.Point(99, 49);
            this.txtMa_Dt.MaxLength = 32;
            this.txtMa_Dt.Name = "txtMa_Dt";
            this.txtMa_Dt.OldValue = null;
            this.txtMa_Dt.ReadOnly = true;
            this.txtMa_Dt.Size = new System.Drawing.Size(118, 20);
            this.txtMa_Dt.TabIndex = 3;
            this.txtMa_Dt.TableName = "DMDT";
            this.txtMa_Dt.TextDisplay = this.txtTen_Dt;
            this.txtMa_Dt.UserTextLength = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_Dt.UserTrimMode = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.txtMa_Dt.Value = ((object)(resources.GetObject("txtMa_Dt.Value")));
            // 
            // lblDia_Chi
            // 
            this.lblDia_Chi.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.lblDia_Chi.AutoSize = true;
            this.lblDia_Chi.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDia_Chi.Location = new System.Drawing.Point(441, 73);
            this.lblDia_Chi.Name = "lblDia_Chi";
            this.lblDia_Chi.Size = new System.Drawing.Size(40, 14);
            this.lblDia_Chi.TabIndex = 95;
            this.lblDia_Chi.Text = "Địa chỉ";
            // 
            // lblOng_Ba
            // 
            this.lblOng_Ba.AutoSize = true;
            this.lblOng_Ba.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblOng_Ba.Location = new System.Drawing.Point(12, 73);
            this.lblOng_Ba.Name = "lblOng_Ba";
            this.lblOng_Ba.Size = new System.Drawing.Size(42, 14);
            this.lblOng_Ba.TabIndex = 96;
            this.lblOng_Ba.Text = "Ông bà";
            // 
            // lblMa_Dt
            // 
            this.lblMa_Dt.AutoSize = true;
            this.lblMa_Dt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_Dt.Location = new System.Drawing.Point(12, 52);
            this.lblMa_Dt.Name = "lblMa_Dt";
            this.lblMa_Dt.Size = new System.Drawing.Size(55, 14);
            this.lblMa_Dt.TabIndex = 94;
            this.lblMa_Dt.Text = "Đối tượng";
            // 
            // lblMa_KhoN
            // 
            this.lblMa_KhoN.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.lblMa_KhoN.AutoSize = true;
            this.lblMa_KhoN.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_KhoN.Location = new System.Drawing.Point(12, 472);
            this.lblMa_KhoN.Name = "lblMa_KhoN";
            this.lblMa_KhoN.Size = new System.Drawing.Size(53, 14);
            this.lblMa_KhoN.TabIndex = 99;
            this.lblMa_KhoN.Text = "Kho nhập";
            // 
            // grdDetail
            // 
            this.grdDetail.AllowUserToAddRows = false;
            this.grdDetail.AllowUserToDeleteRows = false;
            this.grdDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.grdDetail.CheckAutoSize = true;
            this.grdDetail.CheckColor = false;
            this.grdDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.grdDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.Column9,
            this.Column10,
            this.Column11,
            this.Column12,
            this.Column1,
            this.Column17,
            this.Column18,
            this.Column19,
            this.Column20,
            this.Column21,
            this.Column2,
            this.Column23,
            this.Column22});
            this.grdDetail.Font = new System.Drawing.Font("Arial", 8.25F);
            this.grdDetail.Location = new System.Drawing.Point(0, 117);
            this.grdDetail.Name = "grdDetail";
            this.grdDetail.Size = new System.Drawing.Size(794, 346);
            this.grdDetail.TabIndex = 8;
            // 
            // txtMa_KhoN
            // 
            this.txtMa_KhoN.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.txtMa_KhoN.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_KhoN.CheckTextSearched = false;
            this.txtMa_KhoN.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_KhoN.FieldDisplay = "Ten_Kho";
            this.txtMa_KhoN.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_KhoN.FoundIsValid = true;
            this.txtMa_KhoN.Location = new System.Drawing.Point(99, 469);
            this.txtMa_KhoN.MaxLength = 32;
            this.txtMa_KhoN.Name = "txtMa_KhoN";
            this.txtMa_KhoN.OldValue = null;
            this.txtMa_KhoN.ReadOnly = true;
            this.txtMa_KhoN.Size = new System.Drawing.Size(118, 20);
            this.txtMa_KhoN.TabIndex = 9;
            this.txtMa_KhoN.TableName = "DMKHO";
            this.txtMa_KhoN.TextDisplay = this.txtTen_KhoN;
            this.txtMa_KhoN.UserTextLength = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_KhoN.UserTrimMode = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.txtMa_KhoN.Value = ((object)(resources.GetObject("txtMa_KhoN.Value")));
            // 
            // txtTen_KhoN
            // 
            this.txtTen_KhoN.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_KhoN.BackColor = System.Drawing.SystemColors.Control;
            this.txtTen_KhoN.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_KhoN.CheckTextSearched = false;
            this.txtTen_KhoN.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_KhoN.Enabled = false;
            this.txtTen_KhoN.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_KhoN.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_KhoN.Location = new System.Drawing.Point(223, 472);
            this.txtTen_KhoN.Name = "txtTen_KhoN";
            this.txtTen_KhoN.OldValue = null;
            this.txtTen_KhoN.Size = new System.Drawing.Size(559, 13);
            this.txtTen_KhoN.TabIndex = 86;
            this.txtTen_KhoN.UserTextLength = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTen_KhoN.UserTrimMode = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_KhoN.Value = ((object)(resources.GetObject("txtTen_KhoN.Value")));
            // 
            // lblGhi_Chu
            // 
            this.lblGhi_Chu.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.lblGhi_Chu.AutoSize = true;
            this.lblGhi_Chu.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblGhi_Chu.Location = new System.Drawing.Point(12, 493);
            this.lblGhi_Chu.Name = "lblGhi_Chu";
            this.lblGhi_Chu.Size = new System.Drawing.Size(44, 14);
            this.lblGhi_Chu.TabIndex = 81;
            this.lblGhi_Chu.Text = "Ghi chú";
            // 
            // txtGhi_Chu
            // 
            this.txtGhi_Chu.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtGhi_Chu.CheckTextSearched = false;
            this.txtGhi_Chu.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtGhi_Chu.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtGhi_Chu.Location = new System.Drawing.Point(99, 490);
            this.txtGhi_Chu.MaxLength = 254;
            this.txtGhi_Chu.Name = "txtGhi_Chu";
            this.txtGhi_Chu.OldValue = null;
            this.txtGhi_Chu.ReadOnly = true;
            this.txtGhi_Chu.Size = new System.Drawing.Size(683, 20);
            this.txtGhi_Chu.TabIndex = 10;
            this.txtGhi_Chu.UserTextLength = QMVnSoft.AppInstance.TextControlLength.InvoiceDescription;
            this.txtGhi_Chu.UserTrimMode = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtGhi_Chu.Value = ((object)(resources.GetObject("txtGhi_Chu.Value")));
            // 
            // Column9
            // 
            this.Column9.DataPropertyName = "Ma_Vt";
            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column9.DefaultCellStyle = dataGridViewCellStyle1;
            this.Column9.DestinationFields = "Ten_Vt, Dvt";
            this.Column9.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column9.EmptyIsValid = true;
            this.Column9.HeaderText = "Mã vật tư";
            this.Column9.MinimumWidth = 90;
            this.Column9.Name = "Column9";
            this.Column9.ReadOnly = true;
            this.Column9.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column9.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column9.SourceFields = "Ten_Vt, Dvt";
            this.Column9.TableName = "DMVT";
            this.Column9.UserTextLength = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column9.UserTrimMode = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column9.Width = 90;
            // 
            // Column10
            // 
            this.Column10.DataPropertyName = "Ten_Vt";
            this.Column10.HeaderText = "Tên vật tư";
            this.Column10.MinimumWidth = 120;
            this.Column10.Name = "Column10";
            this.Column10.ReadOnly = true;
            this.Column10.Width = 120;
            // 
            // Column11
            // 
            this.Column11.DataPropertyName = "Dvt";
            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column11.DefaultCellStyle = dataGridViewCellStyle2;
            this.Column11.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column11.HeaderText = "Đvt";
            this.Column11.MinimumWidth = 40;
            this.Column11.Name = "Column11";
            this.Column11.ReadOnly = true;
            this.Column11.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column11.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column11.UserTextLength = QMVnSoft.AppInstance.TextControlLength.None;
            this.Column11.UserTrimMode = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column11.Width = 40;
            // 
            // Column12
            // 
            this.Column12.DataPropertyName = "Ma_Kho";
            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column12.DefaultCellStyle = dataGridViewCellStyle3;
            this.Column12.DestinationFields = "Ten_Kho";
            this.Column12.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column12.HeaderText = "Kho";
            this.Column12.MinimumWidth = 50;
            this.Column12.Name = "Column12";
            this.Column12.ReadOnly = true;
            this.Column12.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column12.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column12.SourceFields = "Ten_Kho";
            this.Column12.TableName = "DMKHO";
            this.Column12.UserTextLength = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column12.UserTrimMode = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column12.Width = 50;
            // 
            // Column1
            // 
            this.Column1.HeaderText = "Kệ hàng";
            this.Column1.MinimumWidth = 70;
            this.Column1.Name = "Column1";
            this.Column1.ReadOnly = true;
            this.Column1.Width = 70;
            // 
            // Column17
            // 
            this.Column17.DataPropertyName = "Lo_Hang";
            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column17.DefaultCellStyle = dataGridViewCellStyle4;
            this.Column17.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column17.EmptyIsValid = true;
            this.Column17.HeaderText = "Lô hàng";
            this.Column17.MinimumWidth = 70;
            this.Column17.Name = "Column17";
            this.Column17.ReadOnly = true;
            this.Column17.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column17.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column17.TableName = "LOHANG";
            this.Column17.UserTextLength = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column17.UserTrimMode = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column17.Width = 70;
            // 
            // Column18
            // 
            this.Column18.DataPropertyName = "Han_Dung";
            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column18.DefaultCellStyle = dataGridViewCellStyle5;
            this.Column18.HeaderText = "Hạn dùng";
            this.Column18.MinimumWidth = 70;
            this.Column18.Name = "Column18";
            this.Column18.ReadOnly = true;
            this.Column18.Resizable = System.Windows.Forms.DataGridViewTriState.False;
            this.Column18.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column18.Width = 70;
            // 
            // Column19
            // 
            this.Column19.DataPropertyName = "H_Luong";
            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column19.DefaultCellStyle = dataGridViewCellStyle6;
            this.Column19.HeaderText = "Hàm lượng";
            this.Column19.MinimumWidth = 70;
            this.Column19.Name = "Column19";
            this.Column19.ReadOnly = true;
            this.Column19.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column19.UserTextNumericFormat = QMVnSoft.AppInstance.TextNumericFormat.Percent;
            this.Column19.Width = 70;
            // 
            // Column20
            // 
            this.Column20.DataPropertyName = "Do_Am_PT";
            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column20.DefaultCellStyle = dataGridViewCellStyle7;
            this.Column20.HeaderText = "Độ ẩm";
            this.Column20.MinimumWidth = 70;
            this.Column20.Name = "Column20";
            this.Column20.ReadOnly = true;
            this.Column20.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column20.UserTextNumericFormat = QMVnSoft.AppInstance.TextNumericFormat.Percent;
            this.Column20.Width = 70;
            // 
            // Column21
            // 
            this.Column21.DataPropertyName = "Do_Con_PT";
            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column21.DefaultCellStyle = dataGridViewCellStyle8;
            this.Column21.HeaderText = "Độ cồn";
            this.Column21.MinimumWidth = 70;
            this.Column21.Name = "Column21";
            this.Column21.ReadOnly = true;
            this.Column21.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column21.UserTextNumericFormat = QMVnSoft.AppInstance.TextNumericFormat.Percent;
            this.Column21.Width = 70;
            // 
            // Column2
            // 
            this.Column2.HeaderText = "Kệ nhập";
            this.Column2.MinimumWidth = 70;
            this.Column2.Name = "Column2";
            this.Column2.ReadOnly = true;
            this.Column2.Width = 70;
            // 
            // Column23
            // 
            this.Column23.DataPropertyName = "Ghi_Chu";
            this.Column23.HeaderText = "Ghi chú";
            this.Column23.MinimumWidth = 100;
            this.Column23.Name = "Column23";
            this.Column23.ReadOnly = true;
            this.Column23.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            // 
            // Column22
            // 
            this.Column22.DataPropertyName = "So_Luong9";
            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column22.DefaultCellStyle = dataGridViewCellStyle9;
            this.Column22.HeaderText = "Số lượng";
            this.Column22.MinimumWidth = 90;
            this.Column22.Name = "Column22";
            this.Column22.ReadOnly = true;
            this.Column22.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column22.UserTextNumericFormat = QMVnSoft.AppInstance.TextNumericFormat.Quantity;
            this.Column22.Width = 90;
            this.Column22.ZeroIsValid = true;
            // 
            // FormCTKHOViewer
            // 
            this.ClientSize = new System.Drawing.Size(794, 534);
            this.Controls.Add(this.lblMa_KhoN);
            this.Controls.Add(this.txtDia_Chi);
            this.Controls.Add(this.txtOng_Ba);
            this.Controls.Add(this.txtTen_Dt);
            this.Controls.Add(this.txtMa_Dt);
            this.Controls.Add(this.lblDia_Chi);
            this.Controls.Add(this.lblOng_Ba);
            this.Controls.Add(this.lblMa_Dt);
            this.Controls.Add(this.txtDesc_EN);
            this.Controls.Add(this.txtGhi_Chu);
            this.Controls.Add(this.txtDien_Giai);
            this.Controls.Add(this.txtTen_KhoN);
            this.Controls.Add(this.lblGhi_Chu);
            this.Controls.Add(this.lblDesc_EN);
            this.Controls.Add(this.lblDien_Giai);
            this.Controls.Add(this.txtMa_KhoN);
            this.Controls.Add(this.grdDetail);
            this.Name = "FormCTKHOViewer";
            this.Controls.SetChildIndex(this.grdDetail, 0);
            this.Controls.SetChildIndex(this.lblPhan_Loai, 0);
            this.Controls.SetChildIndex(this.txtSo_Ct, 0);
            this.Controls.SetChildIndex(this.txtNgay_Ps, 0);
            this.Controls.SetChildIndex(this.txtNgay_Ct, 0);
            this.Controls.SetChildIndex(this.txtMa_Loai1, 0);
            this.Controls.SetChildIndex(this.txtMa_Loai2, 0);
            this.Controls.SetChildIndex(this.txtMa_Loai3, 0);
            this.Controls.SetChildIndex(this.txtMa_KhoN, 0);
            this.Controls.SetChildIndex(this.lblDien_Giai, 0);
            this.Controls.SetChildIndex(this.lblDesc_EN, 0);
            this.Controls.SetChildIndex(this.lblGhi_Chu, 0);
            this.Controls.SetChildIndex(this.txtTen_KhoN, 0);
            this.Controls.SetChildIndex(this.txtDien_Giai, 0);
            this.Controls.SetChildIndex(this.txtGhi_Chu, 0);
            this.Controls.SetChildIndex(this.txtDesc_EN, 0);
            this.Controls.SetChildIndex(this.lblMa_Dt, 0);
            this.Controls.SetChildIndex(this.lblOng_Ba, 0);
            this.Controls.SetChildIndex(this.lblDia_Chi, 0);
            this.Controls.SetChildIndex(this.txtMa_Dt, 0);
            this.Controls.SetChildIndex(this.txtTen_Dt, 0);
            this.Controls.SetChildIndex(this.txtOng_Ba, 0);
            this.Controls.SetChildIndex(this.txtDia_Chi, 0);
            this.Controls.SetChildIndex(this.lblMa_KhoN, 0);
            ((System.ComponentModel.ISupportInitialize)(this.grdDetail)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        internal override void OnResetControls()
        {
            base.DetailGridBrowser = this.grdDetail;
            int num = 0;
            if (!base.AppInvoiceParameters.BilingualUsed)
            {
                this.lblDesc_EN.Visible = false;
                this.txtDesc_EN.Visible = false;
                this.txtDien_Giai.Width = (this.txtDesc_EN.Left + this.txtDesc_EN.Width) - this.txtDien_Giai.Left;
                this.txtDien_Giai.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            }
            if (!AppInstance.LocationCtrl)
            {
                base.DetailGridBrowser.Columns[4].Visible = false;
            }
            if (!AppInstance.LotNumberCtrl)
            {
                base.DetailGridBrowser.Columns[5].Visible = false;
            }
            if (!AppInstance.DeadLineCtrl)
            {
                base.DetailGridBrowser.Columns[6].Visible = false;
            }
            if (!AppInstance.QualityCtrl)
            {
                base.DetailGridBrowser.Columns[7].Visible = false;
            }
            if (!AppInstance.DampCtrl)
            {
                base.DetailGridBrowser.Columns[8].Visible = false;
            }
            if (!AppInstance.AlcoholCtrl)
            {
                base.DetailGridBrowser.Columns[9].Visible = false;
            }
            if (!AppInstance.LocationCtrl || (base.AppInvoiceParameters.InvoiceCode != "PWDC"))
            {
                base.DetailGridBrowser.Columns[10].Visible = false;
            }
            if (base.AppInvoiceParameters.FreeFields <= 0)
            {
                num = base.txtMa_Loai1.Top - this.txtGhi_Chu.Top;
                this.lblMa_KhoN.Top += num;
                this.txtMa_KhoN.Top += num;
                this.txtTen_KhoN.Top += num;
                this.lblGhi_Chu.Top += num;
                this.txtGhi_Chu.Top += num;
                this.grdDetail.Height += num;
            }
            if (base.AppInvoiceParameters.InvoiceCode != "PWDC")
            {
                num = this.txtGhi_Chu.Top - this.txtMa_KhoN.Top;
                this.lblMa_KhoN.Visible = false;
                this.txtMa_KhoN.Visible = false;
                this.txtTen_KhoN.Visible = false;
                this.grdDetail.Height += num;
            }
            base.OnResetControls();
        }

        protected override void OnResize(EventArgs e)
        {
            base.OnResize(e);
            if (this.txtOng_Ba != null)
            {
                int num = base.ClientSize.Width - 0xcb;
                this.txtOng_Ba.Width = num / 2;
                this.txtDia_Chi.Left = (this.txtOng_Ba.Left + this.txtOng_Ba.Width) + 0x5c;
                this.txtDia_Chi.Width = num - this.txtOng_Ba.Width;
                this.lblDia_Chi.Left = (this.txtDia_Chi.Left - this.lblDia_Chi.Width) - 6;
                if ((base.AppInvoiceParameters != null) && base.AppInvoiceParameters.BilingualUsed)
                {
                    this.txtDien_Giai.Width = this.txtOng_Ba.Width;
                    this.txtDesc_EN.Left = this.txtDia_Chi.Left;
                    this.txtDesc_EN.Width = this.txtDia_Chi.Width;
                    this.lblDesc_EN.Left = (this.txtDesc_EN.Left - this.lblDesc_EN.Width) - 6;
                }
            }
        }

        internal override void OnShow()
        {
            base.OnShow();
            this.txtMa_Dt.Value = base.LocalMasterRow["Ma_Dt"];
            this.txtTen_Dt.Value = base.LocalMasterRow["Ten_Dt"];
            this.txtOng_Ba.Value = base.LocalMasterRow["Ong_Ba"];
            this.txtDia_Chi.Value = base.LocalMasterRow["Dia_Chi"];
            this.txtDien_Giai.Value = base.LocalMasterRow["Dien_Giai"];
            this.txtDesc_EN.Value = base.LocalMasterRow["Desc_EN"];
            this.txtMa_KhoN.Value = base.LocalMasterRow["Ma_KhoN"];
            this.txtTen_KhoN.Value = base.LocalMasterRow["Ten_KhoN"];
            this.txtGhi_Chu.Value = base.LocalMasterRow["Ghi_Chu"];
        }
    }
}

